1. Technical Field
The present invention relates in general to data processing systems and in particular to data and files in a data processing system. Still more particularly, the present invention relates to an improved method for implementing immutable data sharing file clones.
2. Description of the Related Art
Many files systems, including IBM's General Parallel File System (GPFS), support file system snapshots. File system snapshots are logical, point-in-time copies of a file system. Snapshots can be used for file system backup. Backing up data from a snapshot guarantees that file system content is preserved in a consistent state. Another common use of snapshots is to create regular snapshots and also by keeping some number of recent snapshots on-line, a user can retrieve a previous copy of a file that was deleted or overwritten accidentally.
Snapshots are typically implemented using a copy-on-write mechanism. Copy-on-write defers allocating disk space for a file in the snapshot until the original file is modified or deleted. This has the advantage that snapshot creation is very fast (no data is copied at the time the snapshot is created) and the disk space occupied by a snapshot is limited to the amount of data that was modified or deleted since the snapshot was created. GPFS implements copy-on-write using logical references, called “dittos”. Dittos are stored in inodes and indirect blocks of files in a snapshot (instead of references to physical disk space) to indicate that the corresponding data or metadata in the original file have not yet been modified. When an original file is modified, dittos in a snapshot are replaced with references to copies of the original data. GPFS currently allows only for creating a snapshot of a whole file system. However, snapshots created in GPFS are read-only. Thus while a user can read snapshot files, the user cannot modify or delete files in a snapshot.
Additionally, a Data Management Application Programming Interface (DMAPI) may be deployed that enables a third party application to assist in disk space management in a file system. DMAPI applications function by moving infrequently accessed data to off-line storage. The infrequently used data may then be restored only when needed. A typical DMAPI application will not recognize snapshots. Thus, when snapshots are moved to off-line storage of a file system, there are substantial difficulties encountered with managing snapshots of that file system, as the snapshots may either need to be re-created because the snapshots have been moved or disassociated from the original files. Additionally, restoring a moved snapshot requires a substantial amount of additional disk space since the snapshot will then be modified to include updated data.